Add Book to My BookshelfPurchase This Book Online

Chapter 1 - IP Addresses

Cisco & IP Addressing
Louis D. Rossi, Louis R. Rossi and Thomas Rossi
  Copyright © 1999 The McGraw-Hill Companies, Inc.

Chapter 1: IP Addresses
Objectives
  Define and describe the function of a MAC address.
  Describe data-link addresses and network addresses and identify the key differences between them.
  Describe the different classes of IP addresses.
  Describe the two parts of network addressing, then identify the parts in specific protocol address examples.
  Describe the purpose of the network mask.
  Describe the logical AND process.
What Is a MAC Address?
A Media Access Control address (MAC) is unique for each computing device. This address defines the network connection of the computing device.
The purpose of the MAC address is to locate a unique computing device. This address is most often burned into the circuitry of the Network Interface Card (NIC) hence sometimes this address is called the burned-in address or BIA.
The MAC address is 48 bits in length expressed as 12 hexadecimal digits (0-F). One hex digit represents 4 binary bits.
24 bits are used to describe the vendor who manufactured the card. This number is also called a vendor code or an Organizational Unit Identifier (OUI). Examples are shown in Table 1-1.
Table 1-1  Organizational Units Identifiers
                  OUI Numbers
CISCO
00 00 0c xx xx xx
Novell
00 00 1b xx xx xx
3COM
02 60 8c xx xx xx
DECNET
AA 00 04 xx xx xx
The remaining 24 bits are used to describe the card uniquely (serial number).
The following is the MAC address of the E0 interface of Router_C:
00.00.0c.03.df.60
The vendor code is 00.00.0c.
The serial number is 03.df.60.
The MAC address and the BIA address are the same in most network environments (see Figure 1.1). There are exceptions, but these will be left for a later discussion.
routerC>sh interface e0
Ethernet0 is administratively down, line protocol is down
Hardware is Lance, address is 0060.09c3.df60 (bia 0060.09c3.df60)
MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, rely 255/255, load 1/255
Encapsulation ARPA, loopback not set, keepalive set (10 sec)
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output never, output hang never
Last clearing of “show interface” counters never
Queueing strategy: fifo
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
  0 packets input, 0 bytes, 0 no buffer
  Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
  0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
  0 input packets with dribble condition detected
  0 packets output, 0 bytes, 0 underruns
  0 output errors, 0 collisions, 1 interface resets
  0 babbles, 0 late collision, 0 deferred
  0 lost carrier, 0 no carrier
  0 output buffer failures, 0 output buffers swapped out
Figure 1.1  The MAC Address
Other names for the MAC address include: BIA (Burned in Address), link-layer address, physical address, and hardware address.
To change the BIA address of a device a new NIC must be installed.
As the name implies the MAC address controls access to the media. For a device to gain access to the wire, that device must have a MAC address. For a frame to arrive at a destination it must have the MAC address of the destination.
An analogy might be, if we think of our postal service address, how would we get mail if we did not have an address?
A MAC address that is set to all binary 1, or in hex ff.ff.ff.ff.ff.ff, defines all computing devices on a wire. This address is called a broadcast address. Think of a broadcast address as the mail you get that is addressed to “occupant”. The sender did not use your name but you got it any way.
If all the computing devices are on the same wire we can use the MAC address to locate which NIC is the destination. For instance, if everyone lived on the same street, we would not need a street address, just a house number. There would be no need for an additional part of an address.
A valid question is: how does a sending device know what the MAC address is of the destination? The simple answer is ARP, but we will leave that for a later discussion.
How does a frame arrive at a destination device that is not located on the same wire as the source?
In other words, everyone does not live on the same street so we will have to add another part of the address to identify the street. That part we will add is called a network address.
What Is a Network Address?
I like to think of it as a wire address. The reason I prefer the term wire address is because we use the term network in so many different ways and it gets to be confusing to the beginner. Think about the “wire” to which the computing devices are connected. This wire will have an address.
Sometimes a network address is called a logical address because the administrator will assign this address based upon some logic.
This address is hierarchical in nature because it will define which wire the host is connected to, just as a snail mail address (U.S. Postal Service address) will define which street the recipient lives on.
For that very reason, often a network address has two parts: a network portion and a host portion.
There are many different vendors who use their own unique way to describe network addresses.
A few examples are:
Novell (IPX)
DAD. 0060.09c3.df60
Banyan Vines
30011722:8001
Apple
110.192
DECnet
5.6
In each of the examples above, the address has two parts. The IPX host for example is located on wire DAD and the host address is 0060.09c3.df60.
I did not include an IP address in the list above because there is no vendor who owns the right to an IP address. The American public owns this addressing scheme, due to the fact that the Department of Defense paid for it several years ago.
Because this is the address used on the Internet, it is the most popular addressing used today.
APPLE, Novell and other vendors are replacing their addressing scheme with that of IP.
What Is an IP Address?
Before we begin to talk about IP addresses, let’s discuss two other addresses I am sure you understand and use every day, your snail mail address and your voice address (phone number).
For the sake of this discussion, we will assume your snail mail address has three parts.
Snail Mail
Part 1 Name
Part 2 Street
Part 3 City, State, ZIP Code
Now think about who or what looks at each of these parts.
Part 1 is looked at by the addressee (the resident of Part 2).
Part 2 is looked at by the mail carrier
Part 3 is looked at by the Post Office
When a letter is dropped in a local mailbox it will be brought to the local post office where they will look at Part 3. The letter will be forwarded until it eventually arrives at the remote post office that services the area described in Part 3. At this point, it will be given to the mail carrier who services Part 2. The mail carrier will then drop it in the mailbox defined by Part 2. When you go to the mailbox, you will look at Part 1 to determine who gets the letter.
Keep in mind that the post office does not care about Part 1. You have gotten mail delivered to your house with someone else’s name on Part 1. The mail carrier doesn’t care about the information in Part 3, assuming that the post office has done their job correctly. And finally you don’t care about Parts 2 and 3 because you assume that the post office and the mail carrier have done their job correctly.
  Tip For a letter to get to the destination we need to have a mailing address of the destination.
Voice Address
We will assume that a voice address has 3 parts: 800-555-1212
Part 1 Area Code (800)
Part 2 Prefix or Exchange Code(555)
Part 3 Local Identifier(1212)
Part 1 is looked at by the local switch on the caller’s side
Part 2 is looked at by a remote switch
Part 3 is looked at by a local switch on the receiver’s side
When you call a friend you may or may not use Part 1. A phone switch doesn’t like you to use Part 1 if it’s a local call, because your phone switch does not need Part 1. The switch looks at Part 2 and forwards it to the appropriate port of the switch. If your friend is “long distance” your local switch would look at Part 1 and continue forwarding the call until it gets to the switch that services Part 2. Finally the call would be forwarded to the appropriate port.
  Tip For a voice call to get to its destination we need to have a voice address of the destination.
Notice how easy it is for us to distinguish the different parts of both of the addresses used above.
For a snail mail address each part is on a different line. For a voice address each part is separated by a dash.
Network Address
If we want to send data through a network to a destination we need some type of address that uniquely identifies the destination.
For the purpose of this discussion let’s define a network as a group of computing devices that are connected to several different networks or wires.
We could have a group of computing devices all connected to the same wire. In this case we do not need a network address; we could use Windows 95 and NetBEUI addresses. If everybody lived on the same street would we need a street address to get mail to the destination?
  Tip For data to get to the destination we need to have a network address to the destination.
The IP Address
For the sake of this discussion we will describe the IP address as having two parts.
Part 1 describes the network or the wire address
Part 2 describes the host address
The IP address contains 32 bits: these 32 bits have been divided into 4 octets (8 bits) (see Table 1.2).
Table 1.2  The IP address 192.20.30.1 represented in binary.
Each of these octets is represented in decimal form. The entire address represents the address of the wire and the address of the host. The host can be a workstation attached to the wire or an interface of a router that is attached to the wire.
Each bit value is calculated as shown below:
27 = 128
2
6 = 64
2
5 = 32
2
4 = 16
2
3 = 8
2
2 = 4
2
1 = 2
2
0 = 1
First Octet value is 128+64
Second Octet value is 16+4
Third Octet value is 16+8+4+2
Fourth Octet value is just 1
When all the bits of an octet are turned on (a binary 1 in each position) the octet would have a value of 255:
128+64+32+16+8+4+2+1 = 255
At the end of this section are more examples for you to try on your own.
There are 5 different classes of an IP address; for this discussion we will only be concerned with Class A, B, & C addresses.
The classes are determined by the first three bits of the first octet. The address 102.116.96.103 is a Class A address because the first bit of the first octet is 0. The rules are as follows:
First bit of 0 is a Class A
First two bits of 10 is a Class B
First three bits of 110 is a Class C
Some addresses have been reserved and other addresses are illegal; we will discuss some of these restrictions later.
  Note First Octet Rules
If the first bit is 0 it is a Class A address.
If the first two bits are 10 it is a Class B address.
If the first three bits are 110 it is a class C address.
No address can have a value of zero (0) in the first octet.
The address of 127 will be reserved for loopback addresses.
The above rules provide us with the following ranges:
Class A
1–126
Class B
128–191
Class C
192–223
KNOW these ranges!
I have included Class D and Class E for your information.
Class D
224–239 Multicast addresses (refer to Appendix A)
Class E
240–255 Experimental Addresses
Along with each class of address there is also a default mask that will be assigned.
  Tip Default mask for Class A is 255.0.0.0
Default mask for Class B is 255.255.0.0
Default mask for Class C is 255.255.255.0
What Is the Purpose of the Network Mask?
Earlier we said it was very easy to distinguish the different parts of a snail mail or a voice address.
It is not so easy to determine the different parts of an IP address because we do not use separate lines or dashes. We use what is called a mask.
The mask is also 32 bits in length and it is used to differentiate the network and the host address. Keep in mind that there are two parts to an IP address. We need the mask to know where part 1 ends and part 2 begins. The mask defines the number of bits used for the network address. The remaining bits are host bits.
Another point to remember is you cannot change the bits to which the mask refers. In other words, in a Class C address the first 24 bits (the first 3 octets) cannot be changed. The bits of the 4th octet can be manipulated. These are the bits we will use for subnetting.
Example
Address
172.20.100.16
Mask
255.255.0.0
Wire portion
172.20 Network ID
Host portion
100.16 Host ID
In this example the first 16 bits (172.16) describe the network. The remaining 16 bits (100.16) describe the host.
Think of the network address as being the address of the wire!
A router is a network device that “routes” a packet of information from one wire to another. To perform this task successfully the router needs to have a wire or network address.
The router uses wire or network addresses to determine the path packets will take on their way to the destination
Take a look at the routing table below:
Router_A#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
  D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
  N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
  E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
  i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
  U - per-user static route, o - ODR
Gateway of last resort is not set
C  20.0.0.0/8 is directly connected, Serial0/0
I  175.20.0.0/16 [100/90956] via 20.0.0.2, 00:00:48, Serial0/0
C  10.0.0.0/8 is directly connected, Ethernet0/0
I  150.20.0.0/16 [100/10476] via 20.0.0.2, 00:00:48, Serial0/0
Figure 1.2  Router_A Routing Table
The router is concerned only with the address of the network (wire address). In this case, if the router receives a packet with the destination address of 150.20.0.2, the packet will be sent to interface S0/0. If the packet is addressed to 10.0.0.14 it will be sent to E0/0.
When the router is configured, the router uses two pieces of information to calculate the wire address:
  1. The interface IP address (all 32 bits)
  2. The network mask
The mask can also be presented by what is called the “slash” format.
/16 represents 255.255.0.0
/8 represents 255.0.0.0
/24 represents 255.255.255.0
/28 represents 255.255.255.240
I like the “slash” format; it is not only short but it tells us how many bits are used to describe the wire address. For instance, if the mask is /24 we know that 24 bits are used for the wire address and 8 bits are used for the host (32-24=8). Remember there are only 32 bits in the address so if 24 are used for wire that only leaves 8 for host.
The routing table of Figure 1.2 shows that Router_A is using the default mask for each of its directly connected networks and the networks it learns about are represented with the default mask.
How Is the Wire or Network Address Calculated?
The logical AND method
Let us assume you give a router the address of 150.20.0.2 and we are using the default mask 255.255.0.0 or /16. The router performs what is called the logical AND process to calculate the wire address. Table 1.3 represents the 32 bit address, the default mask and the resulting wire address.
Table 1.3  Logical AND
The logical AND can be explained using truth tables where:
True AND True = True
True
AND False = False
False
AND False = False
As an example, consider the statement “Lou Rossi Sr. is fifty years old and needs to gain 30 pounds.” I am fifty but I need to loose 30 pounds. These facts make our statement false.
Consider the True part as a 1 and the False part as a 0.
1 “AND” 1 = 1
1 “AND” 0 = 0
0 “AND” 0 = 0
Therefore the IP address of the wire is 150.20.0.0 and this is verified by referring to Routing Table 1.1.
The host portion of the address is the last two octets or 150.20.0.2.
When an octet has a value of 255 that means that all bits of the octet are set to 1. Therefore when the logical AND process is calculated, the result will always be the initial value of the octet.
134 “AND” 255 is 134
156 “AND” 255 is 156
Would you not agree that if I do not give you the first part of a statement and I tell you the second part is true, the complete statement will always have the same value as the first part?
Or in truth table format:
T “AND” T is T
F “AND” T is F

 


 
Books24x7.com, Inc © 2000 –  Feedback